<?php
$c = $contents;
?>
<table>
    <tr>
        <td style="text-align:center;width: 255px;vertical-align:top;background-image: url('http://<?=$res_server?>/res/img/paperTextureBgTile.png')">
            <div id="udn_leftbar">

                <div style="text-align: center; margin-bottom: 10px;">
                    <?=ad::get_ad("left_box_1");?>
                </div>
                <h2 <?=$dir?> class="genres_bar_title"><?=lang::get('genres')?></h2>
                <ul <?=$dir?> class="genres_bar">
                    <li><a href='transform?udnsearch=1&title_type=tv_series'><?=lang::get('tv-series')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=action'><?=lang::get('Action')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=animation'><?=lang::get('Animation')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=drama'><?=lang::get('Drama')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=adventure'><?=lang::get('Adventure')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=biography'><?=lang::get('Biography')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=comedy'><?=lang::get('Comedy')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=crime'><?=lang::get('Crime')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=documentary'><?=lang::get('Documentary')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=family'><?=lang::get('Family')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=fantasy'><?=lang::get('Fantasy')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=film_noir'><?=lang::get('Film-Noir')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=game_show'><?=lang::get('Game-Show')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=history'><?=lang::get('History')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=horror'><?=lang::get('Horror')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=music'><?=lang::get('Music')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=musical'><?=lang::get('Musical')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=mystery'><?=lang::get('Mystery')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=news'><?=lang::get('News')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=reality_tv'><?=lang::get('Reality-TV')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=romance'><?=lang::get('Romance')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=sci_fi'><?=lang::get('Sci-Fi')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=sport'><?=lang::get('Sport')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=talk_show'><?=lang::get('Talk-Show')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=thriller'><?=lang::get('Thriller')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=war'><?=lang::get('War')?></a></li>
                    <li><a href='transform?udnsearch=1&genres=western'><?=lang::get('Western')?></a></li>
                </ul>
            </div>
        </td>
        <td style="background-image: url('http://<?=$res_server?>/res/img/paperTextureFooterEdgeTile.png');background-repeat:repeat-y;width: 14px;"> </td>
        <td style="vertical-align: top;">
            <div id="udn_mainbar2" style="width: 728px">
                <!-- SECTION for TITLE -->
                <div id="udn_header">
                    <h1 itemprop="name" id="udn_title"><?=$c['title']?></h1>

                    <!-- MAINBANNER-->
                    <?=ad::get_ad("center_banner_1");?>
                </div>

                <!-- SECTION for DESCRIPTION -->
                <?if($c['description'] != ''){?>
                <p itemprop="description"><?=$c['description']?></p>
                <?}?>
                <?=$c['sorter']?>
                <div id="udn_results2">
                    <ul style="list-style: none">
                        <?foreach($c['results'] as $movie) {?>
                        <li onclick="window.location.href=$(this).find('a').attr('href');" style="width: 100%; height: 180px; float: left; padding: 10px; overflow: hidden">
                            <a href="transform?movieid=<?=$movie['movieid']?>&amp;title=<?=$movie['urltitle']?>-Torrent-Download-dvdrip-brrip-720p-1080p-subs-bluray-3d">
                                <img alt="" style="width: 108px;" class="lazy" src="http://<?=$res_server?>/res/img/movie.png" data-original="<?=udnutil::dlurl($movie['poster'])?>" />

                                <div style="float: right; width: 580px;">
                                    <h4 style="margin: 0px"><?=$movie['title']?> <?=$movie['year']?></h4>
                                    <div>
                                    <span>
                                        <?= $movie['rating'] != '' ? "Rating:".$movie['rating'] : ''?>
                                    </span>
                                    </div>
                                    <div class="udn_genres">
                                        <ul>
                                            <?foreach($movie['genres'] as $genre){?>
                                            <a href="transform?udnsearch=1&genres=<?=$genre['id']?>">
                                                <?=$genre['name']?>
                                            </a>
                                            <?}?>
                                        </ul>
                                    </div>
                                    <p style="font-size: 12px; line-height: 14px;"><?=$movie['description']?></p>
                                    <img src="http://<?=$res_server?>/res/img/download.png" />

                                </div>
                            </a>
                        </li>
                        <?}?>
                    </ul>
                    <div style="padding-top: 20px; clear: both;">
                        <?=$c['number']?>
                        <?=$c['next']?>
                    </div>
                </div>
                <div style="height: 30px;">

                </div>
            </div>
        </td>
    </tr>
</table>